// vite.config.ts
import path from "node:path";
import process from "node:process";
import VueI18nPlugin from "file:///D:/project/vue/alone_frontend/node_modules/.pnpm/@intlify+unplugin-vue-i18n@_42829aaff6a60fd3c0bb18301457c57b/node_modules/@intlify/unplugin-vue-i18n/lib/vite.mjs";
import { getProxy } from "file:///D:/project/vue/alone_frontend/node_modules/.pnpm/@peng_kai+kit@0.3.0-beta.8__f0ab190a5074a190ca334e747d277313/node_modules/@peng_kai/kit/vite/index.mjs";
import vue from "file:///D:/project/vue/alone_frontend/node_modules/.pnpm/@vitejs+plugin-vue@5.1.4_vi_dda7492c2eb6a6dbc16632df9141f544/node_modules/@vitejs/plugin-vue/dist/index.mjs";
import vueJsx from "file:///D:/project/vue/alone_frontend/node_modules/.pnpm/@vitejs+plugin-vue-jsx@4.0._53e873eb7ab20d84d5a0679f27359adf/node_modules/@vitejs/plugin-vue-jsx/dist/index.mjs";
import externalGlobals from "file:///D:/project/vue/alone_frontend/node_modules/.pnpm/rollup-plugin-external-globals@0.12.0_rollup@4.21.1/node_modules/rollup-plugin-external-globals/index.js";
import { visualizer } from "file:///D:/project/vue/alone_frontend/node_modules/.pnpm/rollup-plugin-visualizer@5.12.0_rollup@4.21.1/node_modules/rollup-plugin-visualizer/dist/plugin/index.js";
import UnoCSS from "file:///D:/project/vue/alone_frontend/node_modules/.pnpm/unocss@0.63.4_postcss@8.4.4_575a3270d693706936f2843f8cdb20d4/node_modules/unocss/dist/vite.mjs";
import AutoImport from "file:///D:/project/vue/alone_frontend/node_modules/.pnpm/unplugin-auto-import@0.18.3_c6effea39f6076dca8f496d340492df3/node_modules/unplugin-auto-import/dist/vite.js";
import { AntDesignVueResolver } from "file:///D:/project/vue/alone_frontend/node_modules/.pnpm/unplugin-vue-components@0.2_ee670708e97e84911f367c02de7904e4/node_modules/unplugin-vue-components/dist/resolvers.js";
import Components from "file:///D:/project/vue/alone_frontend/node_modules/.pnpm/unplugin-vue-components@0.2_ee670708e97e84911f367c02de7904e4/node_modules/unplugin-vue-components/dist/vite.js";
import { defineConfig, loadEnv } from "file:///D:/project/vue/alone_frontend/node_modules/.pnpm/vite@5.4.8_@types+node@20.1_090e8e1c1ae1c4272094d6b000731b9f/node_modules/vite/dist/node/index.js";
import { createHtmlPlugin } from "file:///D:/project/vue/alone_frontend/node_modules/.pnpm/vite-plugin-html@3.2.2_vite_1b2c3f9d4c1640fc188213b417d8cbcb/node_modules/vite-plugin-html/dist/index.mjs";
import { VitePWA } from "file:///D:/project/vue/alone_frontend/node_modules/.pnpm/vite-plugin-pwa@0.21.1_vite_9c04a41570d76e946b6678e0ea386481/node_modules/vite-plugin-pwa/dist/index.js";
import tsAlias from "file:///D:/project/vue/alone_frontend/node_modules/.pnpm/vite-plugin-ts-alias@0.1.1/node_modules/vite-plugin-ts-alias/dist/index.mjs";
import VueDevTools from "file:///D:/project/vue/alone_frontend/node_modules/.pnpm/vite-plugin-vue-devtools@7._2f8497723dad5670212bf765b1535932/node_modules/vite-plugin-vue-devtools/dist/vite.mjs";
import autoprefixer from "file:///D:/project/vue/alone_frontend/node_modules/.pnpm/autoprefixer@10.4.20_postcss@8.4.41/node_modules/autoprefixer/lib/autoprefixer.js";
import postcssPresetEnv from "file:///D:/project/vue/alone_frontend/node_modules/.pnpm/postcss-preset-env@10.0.6_postcss@8.4.41/node_modules/postcss-preset-env/dist/index.mjs";
var ENV_DIR = "./envs";
var vite_config_default = defineConfig(({ mode }) => {
  const env = loadEnv(mode, ENV_DIR);
  const proxys = getProxy(env);
  const isProd = mode === "production";
  const isStg = mode === "staging";
  const isDev = mode === "development";
  return {
    envDir: ENV_DIR,
    define: {
      "__APP_VERSION__": `'${process.env.npm_package_version}'`,
      "import.meta.env.VERSION": `"${Date.now()}"`
    },
    server: {
      host: true,
      port: Number(env.VITE_PORT),
      proxy: {
        ...proxys,
        "^/g/(.+)/(api|ws)": {
          target: "https://img.g9aaa.com",
          // target: 'ws://192.168.2.103:9980',
          changeOrigin: true,
          ws: true
        }
      }
    },
    build: {
      target: ["chrome70", "safari14", "firefox68"],
      reportCompressedSize: true,
      minify: "terser",
      // sourcemap: 'hidden',
      terserOptions: {
        compress: {
          drop_console: env.VITE_DROP_CONSOLE === "1",
          drop_debugger: true
        }
      },
      rollupOptions: {
        external: ["echarts", "lottie-web", "@tonconnect/ui"],
        plugins: [
          externalGlobals({
            // 通过 CDN 引入的 ECharts，看index.html中的引入
            "echarts": "echarts",
            "lottie-web": "lottie",
            "@tonconnect/ui": "TON_CONNECT_UI"
          }),
          // PWA配置
          VitePWA({
            registerType: "autoUpdate",
            // 自动更新缓存文件
            // injectRegister: 'script', // service-work内容生成模式
            strategies: "generateSW",
            // 使用 Workbox 生成 Service Worker
            // srcDir: '/js/',
            // filename: 'service-worker.js',
            devOptions: {
              enabled: false
            },
            manifest: false,
            workbox: {
              maximumFileSizeToCacheInBytes: 4e6
              // globPatterns: ['**/*.{js,css,html,ico,png,svg,ts,tsx}'], // 缓存所有静态资源
              // runtimeCaching: [{
              //   urlPattern: /\.html$/,
              //   handler: 'NetworkFirst', // 对 HTML 文档使用网络优先策略
              // }],
            }
          })
        ],
        input: {
          main: path.resolve("index.html"),
          agent: path.resolve("agent.html"),
          pwa: path.resolve("pwa.html")
        },
        onwarn: (warning, warn) => {
          if (["CIRCULAR_DEPENDENCY", "CYCLIC_CROSS_CHUNK_REEXPORT"].includes(warning.code)) {
            return;
          }
          warn(warning);
        }
      }
    },
    plugins: [
      vue({
        template: {
          compilerOptions: {
            isCustomElement: (tag) => tag.startsWith("swiper-")
          }
        }
      }),
      vueJsx(),
      UnoCSS({ inspector: true }),
      globalDefinePlugin(),
      visualizer(),
      VueDevTools(),
      // splitVendorChunkPlugin(),
      tsAlias({ tsConfigName: "tsconfig.app.json" }),
      AutoImport({
        dts: "src/types/auto-imports.d.ts",
        vueTemplate: true,
        imports: ["vue", "vue-router"],
        dirs: [path.resolve("src/auto-import")]
      }),
      Components({
        dts: "src/types/components.d.ts",
        dirs: [],
        globs: [],
        resolvers: [
          // Antd 组件（AXxx）
          AntDesignVueResolver({ importStyle: false }),
          // 本项目组件（TXxx）
          {
            type: "component",
            resolve: (name) => name.match(/^T[A-Z]/) && { name: name.replace(/^T/, ""), from: "~/auto-import/components" }
          }
          // {
          //   type: 'directive' as const,
          //   resolve: (name) => name.match(/^D[A-Z]/) && { name, from: '~/auto-import/directives' },
          // }
        ]
      }),
      VueI18nPlugin({
        runtimeOnly: true,
        compositionOnly: true,
        fullInstall: true,
        include: [path.resolve("src/modules/locale/**/appMessage.json")]
      }),
      createHtmlPlugin({
        inject: {
          tags: [
            ...!isProd ? getErudaCode() : []
          ]
        }
      })
      // sentryVitePlugin({
      //   org: 'ma-sy',
      //   project: 'gam',
      //   authToken: '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',
      // }),
    ],
    css: {
      preprocessorOptions: {
        scss: {
          api: "modern-compiler"
        }
      },
      postcss: {
        plugins: [
          autoprefixer(),
          postcssPresetEnv()
        ]
      }
    }
  };
});
function getErudaCode() {
  return [
    { tag: "script", attrs: { src: "//cdn.jsdelivr.net/npm/eruda" }, injectTo: "head-prepend" },
    { tag: "script", children: "/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) && eruda.init()", injectTo: "body" }
  ];
}
function globalDefinePlugin() {
  let variables = {};
  return {
    name: "vite-plugin-global-define",
    apply: "build",
    configResolved(resolvedConfig) {
      const define = resolvedConfig.define;
      variables = Object.entries(define ?? {}).filter(([key]) => key.startsWith("__APP_")).reduce((acc, [key, value]) => {
        acc[key] = value;
        return acc;
      }, {});
    },
    transformIndexHtml(html) {
      const content = Object.entries(variables).map(([k, v]) => `window.${k} = ${v}`).join(";");
      return html.replace("<head>", `<head>
<script>${content};</script>`);
    }
  };
}
export {
  vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCJEOlxcXFxwcm9qZWN0XFxcXHZ1ZVxcXFxhbG9uZV9mcm9udGVuZFwiO2NvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9maWxlbmFtZSA9IFwiRDpcXFxccHJvamVjdFxcXFx2dWVcXFxcYWxvbmVfZnJvbnRlbmRcXFxcdml0ZS5jb25maWcudHNcIjtjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfaW1wb3J0X21ldGFfdXJsID0gXCJmaWxlOi8vL0Q6L3Byb2plY3QvdnVlL2Fsb25lX2Zyb250ZW5kL3ZpdGUuY29uZmlnLnRzXCI7aW1wb3J0IHBhdGggZnJvbSAnbm9kZTpwYXRoJztcclxuaW1wb3J0IHByb2Nlc3MgZnJvbSAnbm9kZTpwcm9jZXNzJztcclxuaW1wb3J0IFZ1ZUkxOG5QbHVnaW4gZnJvbSAnQGludGxpZnkvdW5wbHVnaW4tdnVlLWkxOG4vdml0ZSc7XHJcbmltcG9ydCB7IGdldFByb3h5IH0gZnJvbSAnQHBlbmdfa2FpL2tpdC92aXRlJztcclxuaW1wb3J0IHZ1ZSBmcm9tICdAdml0ZWpzL3BsdWdpbi12dWUnO1xyXG5pbXBvcnQgdnVlSnN4IGZyb20gJ0B2aXRlanMvcGx1Z2luLXZ1ZS1qc3gnO1xyXG5pbXBvcnQgZXh0ZXJuYWxHbG9iYWxzIGZyb20gJ3JvbGx1cC1wbHVnaW4tZXh0ZXJuYWwtZ2xvYmFscyc7XHJcbmltcG9ydCB7IHZpc3VhbGl6ZXIgfSBmcm9tICdyb2xsdXAtcGx1Z2lu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